package com.yn.pet.controller.tcpserver.factory;

import com.yn.pet.controller.tcpserver.PetServer808Service;
import com.yn.pet.protocol.basics.JTMessage;
import com.yn.pet.entity.T8103;

import com.yn.pet.protocol.t808.*;
import com.yn.pet.server.commons.model.APICodes;
import com.yn.pet.server.commons.model.APIException;
import com.yn.pet.server.commons.model.APIResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;
import reactor.core.publisher.Mono;

@Slf4j
@Component
public class PetServer808ServiceFallbackFactory implements FallbackFactory<PetServer808Service> {

    @Override
    public PetServer808Service create(Throwable cause) {
        log.error("请求PetServerService异常：{}",cause.getMessage(),cause);
        return new PetServer808Service() {
            @Override
            public Mono<APIResult<T0001>> T8103(T8103 request) {
                return Mono.just(APIResult.error(new APIException(APICodes.OperationFailed)));
            }

            @Override
            public Mono<APIResult<T0104>> T8104(JTMessage request) {
                return Mono.just(APIResult.error(new APIException(APICodes.OperationFailed)));
            }

            @Override
            public Mono<APIResult<T0104>> T8106(T8106 request) {
                return Mono.just(APIResult.error(new APIException(APICodes.OperationFailed)));
            }

            @Override
            public Mono<APIResult<T0001>> T8105(T8105 request) {
                return Mono.just(APIResult.error(new APIException(APICodes.OperationFailed)));
            }

            @Override
            public Mono<APIResult<T0107>> T8107(JTMessage request) {
                return Mono.just(APIResult.error(new APIException(APICodes.OperationFailed)));
            }

            @Override
            public Mono<APIResult<T0201_0500>> T8201(JTMessage request) {
                return Mono.just(APIResult.error(new APIException(APICodes.OperationFailed)));
            }

            @Override
            public Mono<APIResult<T0001>> T8202(T8202 request) {
                return Mono.just(APIResult.error(new APIException(APICodes.OperationFailed)));
            }

            @Override
            public Mono<APIResult<T0001>> T8203(T8203 request) {
                return Mono.just(APIResult.error(new APIException(APICodes.OperationFailed)));
            }

            @Override
            public Mono<APIResult<T0001>> T8204(JTMessage request) {
                return Mono.just(APIResult.error(new APIException(APICodes.OperationFailed)));
            }

            @Override
            public Mono<APIResult<T0001>> T8300(T8300 request) {
                return Mono.just(APIResult.error(new APIException(APICodes.OperationFailed)));
            }

            @Override
            public Mono<APIResult<T0001>> T8301(T8301 request) {
                return Mono.just(APIResult.error(new APIException(APICodes.OperationFailed)));
            }

            @Override
            public Mono<APIResult<T0001>> T8302(T8302 request) {
                return Mono.just(APIResult.error(new APIException(APICodes.OperationFailed)));
            }

            @Override
            public Mono<APIResult<T0001>> T8303(T8303 request) {
                return Mono.just(APIResult.error(new APIException(APICodes.OperationFailed)));
            }

            @Override
            public Mono<APIResult<T0001>> T8304(T8304 request) {
                return Mono.just(APIResult.error(new APIException(APICodes.OperationFailed)));
            }

            @Override
            public Mono<APIResult<T0001>> T8400(T8400 request) {
                return Mono.just(APIResult.error(new APIException(APICodes.OperationFailed)));
            }

            @Override
            public Mono<APIResult<T0001>> T8401(T8401 request) {
                return Mono.just(APIResult.error(new APIException(APICodes.OperationFailed)));
            }

            @Override
            public Mono<APIResult<T0201_0500>> T8500(T8500 request) {
                return Mono.just(APIResult.error(new APIException(APICodes.OperationFailed)));
            }

            @Override
            public Mono<APIResult<T0001>> T8600(T8600 request) {
                return Mono.just(APIResult.error(new APIException(APICodes.OperationFailed)));
            }

            @Override
            public Mono<APIResult<T0001>> T8601(T8601 request) {
                return Mono.just(APIResult.error(new APIException(APICodes.OperationFailed)));
            }

            @Override
            public Mono<APIResult<T0001>> T8602(T8602 request) {
                return Mono.just(APIResult.error(new APIException(APICodes.OperationFailed)));
            }

            @Override
            public Mono<APIResult<T0001>> T8603(T8601 request) {
                return Mono.just(APIResult.error(new APIException(APICodes.OperationFailed)));
            }

            @Override
            public Mono<APIResult<T0001>> T8604(T8604 request) {
                return Mono.just(APIResult.error(new APIException(APICodes.OperationFailed)));
            }

            @Override
            public Mono<APIResult<T0001>> T8605(T8601 request) {
                return Mono.just(APIResult.error(new APIException(APICodes.OperationFailed)));
            }

            @Override
            public Mono<APIResult<T0001>> T8606(T8606 request) {
                return Mono.just(APIResult.error(new APIException(APICodes.OperationFailed)));
            }

            @Override
            public Mono<APIResult<T0001>> T8607(T8601 request) {
                return Mono.just(APIResult.error(new APIException(APICodes.OperationFailed)));
            }

            @Override
            public Mono<APIResult<T0608>> T8608(T8608 request) {
                return Mono.just(APIResult.error(new APIException(APICodes.OperationFailed)));
            }

            @Override
            public Mono<APIResult<T0001>> T8700(JTMessage request) {
                return Mono.just(APIResult.error(new APIException(APICodes.OperationFailed)));
            }

            @Override
            public Mono<APIResult<T0001>> T8701(T8701 request) {
                return Mono.just(APIResult.error(new APIException(APICodes.OperationFailed)));
            }

            @Override
            public Mono<APIResult<T0702>> T8702(JTMessage request) {
                return Mono.just(APIResult.error(new APIException(APICodes.OperationFailed)));
            }

            @Override
            public Mono<APIResult<T0805>> T8801(T8801 request) {
                return Mono.just(APIResult.error(new APIException(APICodes.OperationFailed)));
            }

            @Override
            public Mono<APIResult<T0802>> T8802(T8802 request) {
                return Mono.just(APIResult.error(new APIException(APICodes.OperationFailed)));
            }

            @Override
            public Mono<APIResult<T0001>> T8803(T8803 request) {
                return Mono.just(APIResult.error(new APIException(APICodes.OperationFailed)));
            }

            @Override
            public Mono<APIResult<T0001>> T8804(T8804 request) {
                return Mono.just(APIResult.error(new APIException(APICodes.OperationFailed)));
            }

            @Override
            public Mono<APIResult<T0001>> T8805(T8805 request) {
                return Mono.just(APIResult.error(new APIException(APICodes.OperationFailed)));
            }

            @Override
            public Mono<APIResult<T0001>> T8108(T8108 request) {
                return Mono.just(APIResult.error(new APIException(APICodes.OperationFailed)));
            }

            @Override
            public Mono<APIResult<T0001>> T8900(T8900 request) {
                return Mono.just(APIResult.error(new APIException(APICodes.OperationFailed)));
            }

            @Override
            public Mono<APIResult<T0A00_8A00>> T8A00(T0A00_8A00 request) {
                return Mono.just(APIResult.error(new APIException(APICodes.OperationFailed)));
            }
        };
    }
}
